package com.tedu.review;

public class 作业二 {
    public static void main(String[] args) {
        Animal animal=new Animal(){

            public void eat() {
                System.out.println("吃");
            }

            public void sleep() {
                System.out.println("睡");

            }
        };
        animal.eat();
        animal.sleep();
    }
}
abstract class Animal{
    public abstract void eat();
    public abstract void sleep();

}
